package com.iakuil.app.common.db.handler;

import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedJdbcTypes;

/**
 * Java Char数组与数据库VARCHAR类型转换器
 *
 * @author Kai
 * @date 2022/1/25 17:24
 **/
@MappedJdbcTypes({JdbcType.VARCHAR})
public class ToCharArrayHandler extends StringTokenizerTypeHandler<Character> {
    public ToCharArrayHandler() {
        super(Character.class);
    }

    @Override
    Character parseString(String value) {
        return value.charAt(0);
    }
}
